<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <!-- 
    innerHTML是修改div里面的内容
    表单里面的内容是通过value来修改的
    表单禁用设置为disabled
    this 指向事件函数的调用者
  -->
  <input type="button" value="按钮" id="btn">
  <input type="text" value="请输入内容" id="txt">
</body>
<script>
  "use strict";
  let btn = document.getElementById("btn");
  let txt = document.getElementById("txt");
  btn.addEventListener("click", (e) => {
    txt.value = "表单里面的内容了";
    e.currentTarget.disabled = true;
    console.log(e.target.disabled);
  });
</script>

</html>